/*
 * @(#)NotifyPayedRequestBean.java 创建于 2016-07-14 14:54:49
 *
 * 版权：版权所有 Bsoft 保留所有权力。
 */
package hcn.protocol.ods.diagnosis;

import ctd.util.xml.jaxb.DateTimeAdapter;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author <a href="mailto:chinnsii@163.com">zhengshi</a>
 */
@XmlRootElement(name = "notifyPayedRequest")
public class NotifyPayedRequestBean implements Serializable {

    private String orgId;
    private String patientId;
    private String tradeType;
    private String tradeNo;
    private String precalId;
    private Date tradeDate;
    private String payer;
    private String selfPay;
    private String payState;
    private String payType;
    private List<NotifyPayedRequestFeeRecordBean> feeRecords;

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getPatientId() {
        return patientId;
    }

    public void setPatientId(String patientId) {
        this.patientId = patientId;
    }

    public String getTradeType() {
        return tradeType;
    }

    public void setTradeType(String tradeType) {
        this.tradeType = tradeType;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public String getPrecalId() {
        return precalId;
    }

    public void setPrecalId(String precalId) {
        this.precalId = precalId;
    }

    @XmlJavaTypeAdapter(DateTimeAdapter.class)
    public Date getTradeDate() {
        return tradeDate;
    }

    public void setTradeDate(Date tradeDate) {
        this.tradeDate = tradeDate;
    }

    public String getPayer() {
        return payer;
    }

    public void setPayer(String payer) {
        this.payer = payer;
    }

    public String getSelfPay() {
        return selfPay;
    }

    public void setSelfPay(String selfPay) {
        this.selfPay = selfPay;
    }

    public String getPayState() {
        return payState;
    }

    public void setPayState(String payState) {
        this.payState = payState;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    @XmlElementWrapper(name = "feeRecords")
    @XmlElement(name = "feeRecord")
    public List<NotifyPayedRequestFeeRecordBean> getFeeRecords() {
        return feeRecords;
    }

    public void setFeeRecords(List<NotifyPayedRequestFeeRecordBean> feeRecords) {
        this.feeRecords = feeRecords;
    }

    public void addFeeRecord(NotifyPayedRequestFeeRecordBean feeRecord) {
        if (feeRecords == null) {
            feeRecords = new ArrayList<>();
        }
        feeRecords.add(feeRecord);
    }
}
